// InvalidateRequest.h
//

#ifndef __INVALIDATEREQUEST_H__
#define __INVALIDATEREQUEST_H__

#include "base/Entity.h"
#include "base/Request.h"
#include "base/simtypes.h"
#include "util/Pool.h"

class InvalidateRequest : public Request {
  public:
    NEW_DELETE_OPERATORS_H(InvalidateRequest,Request);
    InvalidateRequest(Entity* src, Entity* dest);

    InvalidateRequest(Entity* src, Entity* dest, VA lb, VA ub);

    virtual ~InvalidateRequest();

    VA getLowerBound() const { return lb; }
    VA getUpperBound() const { return ub; }

    bool isTotal() const { return lb == 0 && ub == 0; }
    bool isInRange(VA addr) const { return isTotal() || (addr >= lb && addr <= ub); }

  protected:
    VA lb;
    VA ub;
};

#endif // __INVALIDATEREQUEST_H__

